/***********************************************************************************************************
 *** @Author         : jiabao
 *** @Description    :
 *** @Date           : 2023-10-21 21:29:58
 *** @FilePath       : \c_test\test4\include\ThreadPool.h
 ***********************************************************************************************************/
#ifndef MULTICAST_H
#define MULTICAST_H
#include <unistd.h>
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>  
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string>
#include <string.h>
using namespace std;
class Multicast
{
public:
    Multicast(string groupIp,int groupPort);
    int multicastRead(string &s,struct sockaddr_in *from);
    int multicastSend(string s);
    ~Multicast();
private:
    string mGroupIp;
    int mGroupPort;
    int mSockFd;
    struct ip_mreq mreq;
};

#endif